package weather_service.weatherprovider;

import java.net.*;

/**
 * Utils
 *
 * @author Nazmul Idris
 * @since Jan 1, 2007, 8:58:42 PM
 */
public class Utils {
  /**
   * encodes the URL string to be safe for HTTP transmission...
   * 
   * @param data
   * @return
   */
  public static String encode( String data ){
    try{
      return data==null ? null : URLEncoder.encode( data , "UTF-8" );
    }catch(Exception e){
      return data;
    }
  }
}
